import 'package:flutter/material.dart';
import 'routers/routers.dart';
import 'package:get/get.dart';
import 'binding/binding.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      theme: ThemeData(
        appBarTheme: AppBarTheme(centerTitle: true),
      ),
      initialBinding: AllControllerBinding(), // 全局绑定GetController
      debugShowCheckedModeBanner: false,
      initialRoute: "/", // 初始化路由
      // onGenerateRoute: onGenerateRoute,
      defaultTransition: Transition.rightToLeftWithFade,
      getPages: AppPage.routes,
    );
  }
}
